Invoking Outlook email compose from java

chris (2004-06-09 10:32:27)
4342 views
0 replies
I had to build a button into an applet which when pressed would fire up an Outlook mail compose window with some email addresses ready to go. It's actually very simple if you just build the email addresses into a URL string and call the URL in a new window. Here's a snip of how you would do this:
try{
   email = new URL("mailto:"+emailAddresses);
   java.applet.AppletContext ac = Parent.getAppletContext();
   ac.showDocument(email,"_blank");
} catch (MalformedURLException mue){
}
However I don't know how you would achieve this in an application. What were doing here is really taking advantage of the fact that the applet is running in a browser window - the same thing is easily done with html or javascript.

christo
comment